POV-Ray : Newsgroups : povray.newusers : Image_map like decals : Re: Image_map like decals Server Time
29 Jul 2024 08:22:16 EDT (-0400)
  Re: Image_map like decals  
From: danyolgiax
Date: 3 May 2006 04:55:01
Message: <web.44586fbe319c0b1aa8eb78fb0@news.povray.org>
After few tries I've resolved with this:

#declare frontlabel =
 pigment { image_map { png "train.png" // the file to read
(iff/gif/tga/png/sys)
                        map_type 0 // 0=planar, 1=spherical, 2=cylindrical,
5=torus
                        interpolate 0 // 0=none, 1=linear, 2=bilinear,
4=normalized distance
                        once
                        } // image_map
            translate <1.5,0.5,0>

            scale <3,0,0>
            translate <-4.5,-0.5,0>
           }


#declare label1 =
  pigment {
  radial
  pigment_map {
    [ 0.5 rgbt 1 ]
    [ 0.5 frontlabel ]

    } }

box {
  <0,0,0><3,1,1>
        texture { pigment {color rgb <0.5,0.5,0.5>} }
         texture { pigment { label1 } }
  }

note that train.png is 300x100 png image!

Ok it works! but I can't understand those values:

 translate <1.5,0.5,0>
 scale <3,0,0>
 translate <-4.5,-0.5,0>






"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "danyolgiax" <d.o### [at] gmailcom> wrote in message
> news:web.4457760fbc052dbba8eb78fb0@news.povray.org...
> > Hi!
> >
> > I've got plane's wings where I want to put flags and other stuff like
> > decals
> > from gif or png files...
> >
> > It is possible? how?
> >
> > I tried with something like this:
> >
> > box
> > {
> >    <0,0,0><4,4,0.1>
> >    texture {
> >     pigment {image_map {
> >     png "img.png"  once
> >     }
> > }
> > }
> > }
> >
> > with no results!
> >
> > Dox
> >
>
> Hi Dany,
>
> I pasted your box definition into a scene file and it worked OK for me. The
> image is only one unit by one unit by default so it initially only appeared
> in the bottom left quarter of your box, but it was there. Scaling the image
> by 4 made it fill your 4x4 unit box.
>
> Is it possible that the problem is somewhere else in your scene - e.g.
> camera not pointing at the box , or something else blocking the cameras line
> of sight?
>
> Regards,
> Chris B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.